﻿using System;


//定义公用的函数和类定义
namespace generic_class
{

    //表格方向，横向和竖向
    enum _direction
    {
        TABLE_VER = 0,
        TABLE_HOR,
    }

    enum _graphics_type
    {
        GRAPICS_GOOSE = 0,//googse 图

    }

    public enum _device_show_type
    { 
        BAY = 0,      //按间隔
        LEVEL =1,     //按电压
        TANG = 2,     //按屏柜
        DEVICE =3,    //按设备
    }

    //主菜单显示的列表目录，从group_table中获取
    public struct group_item
    {
        public int idgroup;
        public int? parentId;
        public string name;
        public int? scdid;
    };

    //屏柜的列表目录，从ied_table中获取
    public struct ied_item
    {
        public int idied;
        public string name;
        public byte[] content;
        public double? len;
        public int? scdid;
        public string type;
        public string manufacturer;
        public string ieddesc;
        public string configVersion;
        public int inUse;
        public int? deviceType;
        public int? tangid;
        public int? vLevel;
        public string bay;
        public string iedType;
        public string deviceNo;
        public string TangCode;
        public string TangPos;
    };

    //屏柜的列表，从tang_table中获取
    public struct tang_item
    {
        public int idtang;
        public string objectDesc;
        public string objectType;
        public string objectSize;
        public string manufacture;
        public int? scdid;
        public string gpRow;
        public string rowPortNum;
        //public int? roomid;
    };

    //光缆的列表，从cable_table中获取
    public struct cable_item
    {
        public int idcable;
        public string name;
        public string cableType;
        public int? scdid;
        public int? start_tangid;
        public int? end_tangid;
        public string fiberNum;
        public string linkType;
        public int? locked;
    };

    //纤芯的列表，从line_table中获取
    public struct line_item
    {
        public int idline;
        public int? port1;
        public int? port2;
        public string lineDesc;
        public string manufacture;
        public string lineType;
        public double? length;
        public int? scdid;
        public string crossShelf1;
        public int? shelfPortId1;
        public int? shelfPortIndex;
        public int? parentid;
        public string crossShelf2;
        public int? shelfPortId2;
    };

    //光配的列表，从gp_table中获取
    public struct gp_item
    {
        public int idgp;
        public int? cableid;
        public int? tang;
        public int? idline;
        public int? locked;
        public int? row;
        public int? col;
        public int? scdid;
    };

    //端口的列表，从port_table中获取
    public struct port_item
    {
        public int idport;
        public int? parentid;
        public int? portType;
        public string portDesc;
        public int? vlanType;
        public string vlan;
        public int? parentType;
        public string fiberType;
        public int? sendType;
        public int? scdid;
        public string groupName;
    };

    //插件的列表，从folder_table中获取
    public struct folder_item
    {
        public int idfolder;
        public string name;
        public string objectDesc;
        public int? deviceId;
        public int? scdid;
        public string manufacturer;
        public string folderType;
    };

    //连接信息的列表，从inforline_table中获取
    public struct inforline_item
    {
        public int idinforline;
        public string name;
        public int? portid;
        public int? scdid;
        public string inforDesc;
        public int? inforIndex;
        public string linkType;
        public int? gp;
    };

    //纤芯的信息
    public class line_info
    {
        public int lineid;
        public int? portindex;
        public int? gp_row;
        public int? gp_col;
        public int? sendPort;
        public string sendPortName;
        public string iedname1;
        public string interface1;
        public string remark;
        public int? recvPort;
        public string recvPortName;
        public string iedname2;
        public string interface2;
    }

}
